//
//  HJWithdrawalRecordCell.m
//  Sneakers
//
//  Created by 胡光健 on 2017/9/25.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HJWithdrawalRecordCell.h"
#import "HJWithdrawalModel.h"

@interface HJWithdrawalRecordCell()
@property (weak, nonatomic) IBOutlet UILabel *bankCard;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UILabel *moneyNo;
@property (weak, nonatomic) IBOutlet UILabel *title;

@end
@implementation HJWithdrawalRecordCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

// 提现记录
-(void)setWithdrawalModel:(HJWithdrawalModel *)withdrawalModel {
    _withdrawalModel = withdrawalModel;
    self.title.text = @"提现";
    self.moneyNo.text = [NSString stringWithFormat:@"￥%@",withdrawalModel.money];
    self.bankCard.text = withdrawalModel.detail;
    self.time.text = [CommonTools getTimeStrBytimeSt:withdrawalModel.created_at];
}
// 交易记录
-(void)setTransactionModel:(HJTransactionModel *)transactionModel {
    _transactionModel = transactionModel;
    NSString *staute;
    if ([transactionModel.state isEqualToString:@"0"]) {
        self.title.text = @"收入";
        staute = @"+￥";
    }else {
        self.title.text = @"支出";
        staute = @"-￥";
    }
    self.moneyNo.text = [NSString stringWithFormat:@"%@%@",staute,transactionModel.money];
    self.bankCard.text = transactionModel.detail;
    self.time.text = [CommonTools getTimeStrBytimeSt:transactionModel.created_at];
    
}
@end
